package cn.edu.lcu.cs.javaprogramming.enumdemo;

import lombok.Getter;

/**
 * 三元色
 */
@Getter
public enum PrimaryColor {
    BLUE("蓝色", 1), RED("红色", 2), GREEN("绿色", 3);

    private String name;
    private int index;

    private PrimaryColor(String name, int index) {
        this.name = name;
        this.index = index;
    }

    @Override
    public String toString() {
        return name;
    }
}